
import os
import string
import glob

files = glob.glob('C:\Windows\*.exe')

# recursive files listing
for root, dirs, files in os.walk('../examples'):
    for fileName in files:
        print root,fileName

################

for filename in files:
    if os.path.isfile(filename):
        print filename

# os environment #########################################

filename = os.environ.get('PYTHONSTARTUP')
print filename

filename = os.environ.get('PYTHONPATH')
print filename

if filename and os.path.isfile(filename):
    print filename
    #execfile(filename)



# popen ##################################################

a = 'dir'
b = 'c:\\'

outdir = os.popen('%s %s' % (a, b)).read()

for x in string.split(outdir,'\n'):
    print x 
